Transition type determination method and apparatus, and electronic device and storage medium

ABSTRACT

Provided are a transition type determination method, an electronic device and a storage medium. The method includes: acquiring a picture matching degree of a candidate transition type with a transition position between two adjacent video clips, and acquiring a music matching degree of the candidate transition type; determining, based on the acquired image matching degree and the acquired music matching degree, a matching degree of the candidate transition type at the transition position; and determining, according to the matching degree, whether to determine the candidate transition type as a target transition type, where the target transition type is used for a transition effect between the two adjacent video clip.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation of the International applicationPCT/CN2021/102531, filed on Jun. 25, 2021. This Internationalapplication claims priority to Chinese Patent Application No.202010611568.2, filed on Jun. 29, 2020. The contents of the aboveapplications are hereby incorporated by reference in their entireties.

TECHNICAL FIELD

The present disclosure relates to the field of computer technologies,and particularly to a transition type determination method andapparatus, an electronic device, and a storage medium.

BACKGROUND

When editing a video, video creators need to manually add a transitioneffect between each pair of adjacent video clips. During this process,the creators need to watch the video repeatedly so as to select asuitable transition effect for adjacent video clips, which consumes alot of labor and time costs. Moreover, the fitness of the transitioneffect depends on the professional experience of the creators. It isoften difficult for creators with insufficient professional experienceto create a suitable transition effect, thus affecting the quality ofthe video.

Therefore, how to quickly provide a suitable transition effect for avideo has become a technical problem that needs to be solved urgently atpresent.

SUMMARY

Embodiments of the present disclosure provide a transition typedetermination method and apparatus, an electronic device, and a storagemedium, which aim to solve the technical problem in the related art thatit is difficult to quickly add a suitable transition effect to a video.

In a first aspect, an embodiment of the present disclosure provides atransition type determination method, including: acquiring a picturematching degree of a candidate transition type with a transitionposition between two adjacent video clips, and acquiring a musicmatching degree of the candidate transition type, where the picturematching degree is determined according to the two adjacent video clipsand the candidate transition type, and the music matching degree isdetermined according to the candidate transition type and backgroundmusic of a video to which the two adjacent video clips belong;determining, based on the acquired picture matching degree and theacquired music matching degree, a matching degree of the candidatetransition type at the transition position; and determining, accordingto the matching degree, whether to determine the candidate transitiontype as a target transition type for the transition position, where thetarget transition type is used for a transition effect between the twoadjacent video clips.

In the above-mentioned embodiment of the present disclosure, in animplementation, if the transition position is a designated transitionposition in the video, the target transition type at the transitionposition is a designated transition type corresponding to the designatedtransition position.

In the above-mentioned embodiment of the present disclosure, in animplementation, the determining, according to the matching degree,whether to determine the candidate transition type as a targettransition type for the transition position includes: adding a firstadjustment coefficient to the matching degree of the candidatetransition type, when the transition position is the designatedtransition position in the video and if the candidate transition type isanother transition type other than the designated transition type, wherethe first adjustment coefficient is used to make the candidatetransition type excluded for the target transition type.

In the above embodiment of the present disclosure, in an implementation,if the target transition type occurs at the transition position, thenumber of occurrences of the target transition type is less than a firstspecified number of times, and/or the number of consecutive occurrencesof the target transition type is less than a second specified number oftimes.

In the above-mentioned embodiment of the present disclosure, in animplementation, the determining, according to the matching degree,whether to determine the candidate transition type as a targettransition type for the transition position includes: adding a secondadjustment coefficient to the matching degree of the candidatetransition type, when the candidate transition type occurs at thetransition position and if the number of occurrences of the candidatetransition type is greater than or equal to the first specified numberof times, and/or if the number of consecutive occurrences of thecandidate transition type is greater than or equal to the secondspecified number of times, where the second adjustment coefficient isused to make the candidate transition type excluded for the targettransition type.

In the above-mentioned embodiment of the present disclosure, in animplementation, the determining, according to the matching degree,whether to determine the candidate transition type as a targettransition type for the transition position, further includes: when thetransition position is a first transition position of the video,determining the matching degree of the candidate transition type at thefirst transition position, as a largest matching degree of the candidatetransition type at the transition position; when the transition positionis a non-first transition position of the video, determining, based onthe matching degree of the candidate transition type at this transitionposition, and on respective largest matching degrees of the candidatetransition type and other candidate transition types at a previoustransition position preceding this transition position in the video, alargest matching degree of the candidate transition type at thistransition position, and a candidate transition type that should beselected for the previous transition position when this transitionposition has the largest matching degree; and selecting a correspondingtarget transition type for each transition position of the video, basedon respective largest matching degrees of the candidate transition typeand the other candidate transition types at each of non-first transitionpositions, and on a candidate transition type that should be selectedfor a previous transition position preceding each of the non-firsttransition positions when the non-first transition position obtains itslargest matching degree.

In a second aspect, an embodiment of the present disclosure provides atransition type determination apparatus, including: an initial matchingdegree acquisition unit, configured to acquire a picture matching degreeof a candidate transition type with a transition position between twoadjacent video clips, and acquire a music matching degree of thecandidate transition type, where the picture matching degree isdetermined according to the two adjacent video clips and the candidatetransition type, and the music matching degree is determined accordingto the candidate transition type and background music of a video towhich the two adjacent video clips belong; a transition positionmatching degree determination unit, configured to determine, based onthe acquired picture matching degree and the acquired music matchingdegree, a matching degree of the candidate transition type at thetransition position; and a target transition type selection unit,configured to determine, according to the matching degree, whether todetermine the candidate transition type as a target transition type forthe transition position, where the target transition type is used for atransition effect between the two adjacent video clips.

In the above embodiment of the present disclosure, in an implementation,the target transition type selection unit is configured to: if thetransition position is a designated transition position in the video,determine a designated transition type corresponding to the designatedtransition position, as the target transition type at the transitionposition.

In the above embodiment of the present disclosure, in an implementation,the target transition type selection unit is configured to: add a firstadjustment coefficient to the matching degree of the candidatetransition type, when the transition position is the designatedtransition position in the video and if the candidate transition type isanother transition type other than the designated transition type, wherethe first adjustment coefficient is used to make the candidatetransition type excluded for the target transition type.

In the above embodiment of the present disclosure, in an implementation,if the target transition type occurs at the transition position, thenumber of occurrences of the target transition type is less than a firstspecified number of times, and/or the number of consecutive occurrencesof the target transition type is less than a second specified number oftimes.

In the above embodiment of the present disclosure, in an implementation,the target transition type selection unit is configured to: add a secondadjustment coefficient to the matching degree of the candidatetransition type, when the candidate transition type occurs at thetransition position and if the number of occurrences of the candidatetransition type is greater than or equal to the first specified numberof times, and/or if the number of consecutive occurrences of thecandidate transition type is greater than or equal to the secondspecified number of times, where the second adjustment coefficient isused to make the candidate transition type excluded for the targettransition type.

In the above embodiment of the present disclosure, in an implementation,the target transition type selection unit is further configured to: whenthe transition position is a first transition position of the video,determine the matching degree of the candidate transition type at thefirst transition position, as a largest matching degree of the candidatetransition type at the transition position; when the transition positionis a non-first transition position of the video, determine, based on thematching degree of the candidate transition type at this transitionposition, and on respective largest matching degrees of the candidatetransition type and other candidate transition types at a previoustransition position preceding this transition position in the video, alargest matching degree of the candidate transition type at thistransition position, and a candidate transition type that should beselected for the previous transition position when this transitionposition has the largest matching degree; and select a correspondingtarget transition type for each transition position of the video, basedon the respective largest matching degrees of the candidate transitiontype and the other candidate transition types at each of non-firsttransition positions, and on a candidate transition type that should beselected for a previous transition position preceding each of thenon-first transition positions when the non-first transition positionobtains its largest matching degree.

In a third aspect, an embodiment of the present disclosure provides anelectronic device, including: at least one processor, and a memorycommunicatively connected with the at least one processor. The memorystores instructions executable by the at least one processor. Theinstructions are configured to execute the method described in any oneof the above-mentioned first aspect.

In a fourth aspect, an embodiment of the present disclosure provides astorage medium storing computer-executable instructions thereon. Thecomputer-executable instructions are configured to execute the methoddescribed in any one of the above-mentioned first aspect.

In a fifth aspect, an embodiment of the present disclosure provides acomputer program product, which includes a computer program carried on acomputer-readable medium. The computer program, when being executed by aprocessor, causes the processor to implement the method described in anyone of the above-mentioned first aspect.

In a sixth aspect, an embodiment of the present disclosure provides acomputer program, which, when running on an electronic device, causesthe electronic device to implement the method described in any one ofthe above-mentioned first aspect.

The above technical solutions provide a new technical proposal ofautomatically selecting a transition type, which replaces the technicalsolution in the related art that requires creators to manually set thetransition effects.

Specifically, a to-be-processed video has multiple clips. Among themultiple clips, there is a transition position between every twoadjacent video clips. Furthermore, multiple candidate transition typesare preset, and for each transition position, a target transition typeneeds to be selected from the multiple candidate transition types, so asto perform the respective transition operation. The following describesin detail how to determine, for a transition position, whether acandidate transition type is its target transition type.

First, a picture matching degree of the candidate transition type at thetransition position of the video and a music matching degree of thecandidate transition type are acquired.

The picture matching degree is determined according to the two adjacentvideo clips and the candidate transition type. The picture matchingdegree of the candidate transition type at the transition positionrepresents the fitness of the candidate transition type to the picturesof the two video clips corresponding to the transition position.

In a case where the to-be-processed video is provided with backgroundmusic, each video clip and each transition position in the video alsouse the background music. The music matching degree is determinedaccording to the candidate transition type and the background music ofthe video to which the two adjacent video clips corresponding to thetransition position belong. The music matching degree represents thefitness to the background music of the video when the candidatetransition type is adopted at the transition position.

Next, based on the acquired picture matching degree and the acquiredmusic matching degree, the matching degree of the candidate transitiontype at the transition position is determined. For a candidatetransition type at a transition position, the overall fitness, i.e., thematching degree, of the candidate transition type at the transitionposition may be determined based on the fitness of the candidatetransition type to the pictures of the two video clips corresponding tothe transition position in combination with the fitness of the candidatetransition type to the background music of the video. In other words,the matching degree of the candidate transition type at the transitionposition accurately and reliably shows the overall fitness of thecandidate transition type to the background music of the video and tothe pictures of the two video clips corresponding to the transitionposition. With the accurate and reliable matching degree of thecandidate transition type with the transition position, the fitness ofthe target transition type finally selected for the transition positionis also improved.

Finally, according to the matching degree of the candidate transitiontype at the transition position, it is determined whether the candidatetransition type is the target transition type for the transitionposition. For any transition position, the target transition typeselected therefor is a candidate transition type among the multiplecandidate transition types which has high fitness to the transitionposition and achieves the best transition effect. In other words, if thematching degree of the candidate transition type at the transitionposition meets the above condition, the candidate transition type isdetermined as the target transition type for the transition position;and if the matching degree of the candidate transition type at thetransition position does not meet the above condition, the candidatetransition type is not determined as the target transition type for thetransition position.

Through the above technical solutions, a transition type with highfitness to a transition position and enabling the best transition effectcan be automatically selected for the transition position, which notonly reduces the difficulty in implementing video transition, but alsoenables high-quality video transition effects, improving the userexperience.

BRIEF DESCRIPTION OF DRAWINGS

In order to illustrate the technical solutions of the embodiments of thepresent disclosure more clearly, the drawings needed to be used for theembodiments are briefly introduced hereafter. Obviously, the drawings inthe following description illustrates only some embodiments of thepresent disclosure. For those of ordinary skill in the art, otherdrawings can also be obtained from these drawings without any creativeeffort.

FIG. 1 illustrates a flowchart of a transition type determination methodaccording to an embodiment of the present disclosure.

FIG. 2 illustrates a flowchart of a transition type determination methodaccording to another embodiment of the present disclosure.

FIG. 3 illustrates a flowchart of a transition type determination methodaccording to yet another embodiment of the present disclosure.

FIG. 4 illustrates a flowchart of a transition type determination methodaccording to still another embodiment of the present disclosure.

FIG. 5 illustrates a flowchart of a transition type determination methodaccording to still yet another embodiment of the present disclosure.

FIG. 6 illustrates a flowchart of a transition type determination methodaccording to still yet another embodiment of the present disclosure.

FIG. 7 illustrates a flowchart of a transition type determination methodaccording to still yet another embodiment of the present disclosure.

FIG. 8 illustrates a block diagram of a transition type determinationapparatus according to an embodiment of the present disclosure.

FIG. 9 illustrates a block diagram of an electronic device according toan embodiment of the present disclosure.

DESCRIPTION OF EMBODIMENTS

In order to better understand the technical solutions of the presentdisclosure, the embodiments of the present disclosure are described indetail below with reference to the accompanying drawings.

It should be clarified that the described embodiments here are only apart, rather than all, of the embodiments of the present disclosure.Based on the embodiments in the present disclosure, all otherembodiments, obtained by those of ordinary skill in the art without anycreative work, should fall within the scope of protection of the presentdisclosure.

The terms used in the embodiments of the present disclosure are only forthe purpose of describing specific embodiments, and are not intended tolimit the present disclosure. In addition, it should be noted that thenumerical numbers 1 to 10 used in combination with the embodiments, suchas Embodiment 1, Embodiment 2, . . . and Embodiment 10, do not imply arelative importance between these embodiments, or do not imply that theembodiments are distinct from each other and cannot be combined witheach other; rather, this is just for cease of description of the variousembodiments, and the various embodiments can be combined with each otherwithout conflict. As used in the embodiments and the appended claims ofthe present disclosure, the singular forms “a”, “an”, and “the” areintended to include the plural forms as well, unless the context clearlydictates otherwise.

Embodiment 1

A to-be-processed video has multiple clips. Among the multiple clips,there is a transition position between every two adjacent video clips.Furthermore, multiple candidate transition types are preset, and foreach transition position, a target transition type needs to be selectedfrom the multiple candidate transition types, so as to perform therespective transition operation. Next, referring to FIG. 1 , it isdescribed in detail how to determine, for a transition position, whethera candidate transition type is its target transition type.

As shown in FIG. 1 , the flow of a transition type determination methodaccording to an embodiment of the present disclosure includes steps asfollows.

At step 102, a picture matching degree of a candidate transition typewith a transition position between two adjacent video clips is acquired,and a music matching degree of the candidate transition type isacquired.

First, the picture matching degree of the candidate transition type atthe transition position of the video and the music matching degree ofthe candidate transition type are acquired.

The picture matching degree is determined according to the two adjacentvideo clips and the candidate transition type. The picture matchingdegree of the candidate transition type at the transition positionrepresents the fitness of the candidate transition type to the picturesof the two video clips corresponding to the transition position.

In a case where the to-be-processed video is provided with backgroundmusic, each video clip and each transition position in the video alsouse the background music. The music matching degree is determinedaccording to the candidate transition type and the background music ofthe video to which the two adjacent video clips corresponding to thetransition position belong. The music matching degree represents thefitness to the background music of the video when the candidatetransition type is adopted at the transition position.

At step 104, the matching degree of the candidate transition type at thetransition position is determined, based on the acquired picturematching degree and the acquired music matching degree.

Next, based on the acquired picture matching degree and the acquiredmusic matching degree, the matching degree of the candidate transitiontype at the transition position is determined. For a candidatetransition type at a transition position, the overall fitness, i.e., thematching degree, of the candidate transition type at the transitionposition may be determined based on the fitness of the candidatetransition type to the pictures of the two video clips corresponding tothe transition position in combination with the fitness of the candidatetransition type to the background music of the video.

In other words, the matching degree of the candidate transition type atthe transition position accurately and reliably shows the overallfitness of the candidate transition type to the background music of thevideo and to the pictures of the two video clips corresponding to thetransition position. With the accurate and reliable matching degree ofthe candidate transition type with the transition position, the fitnessof the target transition type finally selected for the transitionposition is also improved.

At step 106, it is determined, according to the matching degree, whetherto determine the candidate transition type as a target transition typefor the transition position, where the target transition type is usedfor a transition effect between the two adjacent video clips.

Finally, it is determined, according to the matching degree of thecandidate transition type at the transition position, whether thecandidate transition type is the target transition type for thetransition position. For any transition position, the target transitiontype selected therefor is a candidate transition type among the multiplecandidate transition types which has high fitness to the transitionposition and achieves the best transition effect. In other words, if thematching degree of the candidate transition type at the transitionposition meets the above condition, the candidate transition type isdetermined as the target transition type for the transition position;and if the matching degree of the candidate transition type at thetransition position does not meet the above condition, the candidatetransition type is not determined as the target transition type for thetransition position.

Through the above technical solutions, a transition type with highfitness to a transition position and enabling the best transition effectcan be automatically selected for the transition position, which notonly reduces the difficulty in implementing video transition, but alsoenables high-quality video transition effects, improving the userexperience.

Embodiment 2

A to-be-processed video has multiple clips. Among the multiple clips,there is a transition position between every two adjacent video clips.Furthermore, multiple candidate transition types are preset, and foreach transition position, a target transition type needs to be selectedfrom the multiple candidate transition types, so as to perform therespective transition operation. Next, referring to FIG. 2 , targettransition types are determined for multiple transition positionsrespectively, from an overall perspective.

As shown in FIG. 2 , the transition type determination method accordingto another embodiment of the present disclosure includes steps asfollows.

At step 202, a picture matching degree of each of multiple candidatetransition types at each transition position of the video is acquired,and respective music matching degrees of the multiple candidatetransition types are acquired.

The to-be-processed video has multiple clips. Among the multiple clips,there is a transition position between every two adjacent video clips.Furthermore, multiple candidate transition types are preset, and foreach transition position, a target transition type needs to be selectedfrom the multiple candidate transition types, so as to perform therespective transition operation.

The picture matching degree is determined according to the video clipscorresponding to each transition position, and each transition positioncorresponds to two video clips. For any candidate transition type, thepicture matching degree of the candidate transition type at anytransition position represents the fitness of the candidate transitiontype to the pictures of the two video clips corresponding to thetransition position.

In a case where the to-be-processed video is provided with backgroundmusic, each video clip and each transition position in the video alsouse the background music. For any candidate transition type, the musicmatching degree thereof represents the fitness of the candidatetransition type to the background music of the video. Accordingly, themusic matching degree is determined according to the background music ofthe video.

At step 204, respective matching degrees of the multiple candidatetransition types at each transition position are determined, based onthe acquired picture matching degrees and the acquired music matchingdegrees.

For any candidate transition type at any transition position, theoverall fitness, i.e., the matching degree, of the candidate transitiontype at the transition position may be determined based on the fitnessof the candidate transition type to the pictures of two video clipscorresponding to the transition position in combination with the fitnessof the candidate transition type to the background music of the video.In other words, for any candidate transition type at any transitionposition, the matching degree of the candidate transition type at thetransition position accurately and reliably shows the overall fitness ofthe candidate transition type to the background music of the video andto the pictures of the two video clips corresponding to the transitionposition. With the accurate and reliable matching degrees of theindividual candidate transition types with the transition position, thefitness of the target transition type finally selected for thetransition position is also improved.

At step 206, a target transition type is selected from the multiplecandidate transition types for each transition position, according tothe matching degrees of the multiple candidate transition types at eachtransition position.

For any transition position, the target transition type selectedtherefor is a candidate transition type among the multiple candidatetransition types which has high fitness to the transition position andachieves the best transition effect.

Embodiment 1 and Embodiment 2 provide a new technical solution ofautomatically selecting a transition type, which replaces the technicalsolution in the related art that requires the creator to manually setthe transition effect. As a result, a transition type with high fitnessto a transition position and enabling the best transition effect can beautomatically selected for the transition position, which not onlyreduces the difficulty in implementing video transitions, but alsoenables high-quality video transition effects, improving the userexperience.

Embodiment 3

On the basis of Embodiment 1 and Embodiment 2, when determining whetherto determine the candidate transition type as the target transition typefor the transition position, a further limitation is added.

In a possible design, if the transition position is a designatedtransition position in the video, a designated transition typecorresponding to the designated transition position is determined as thetarget transition type for the transition position. In other words, anon-designated transition type is not allowed to occur at a designatedtransition position in the video. For example, for 3 transitionpositions in the video, transition position 1 is set as the designatedtransition position; and for 5 candidate transition types, candidatetransition types 1, 3, 4, and 5 are set as the designated transitiontypes; in this case, when selecting the target transition type fortransition position 1, candidate transition type 2 is excluded forselection.

Further, when the transition position is a designated transitionposition in the video, if the candidate transition type is anothertransition type other than the designated transition type(s), a firstadjustment coefficient is added to the matching degree of the candidatetransition type. The first adjustment coefficient is used to make thecandidate transition type excluded for the target transition type. Themagnitude of the first adjustment coefficient is much larger than themagnitude of the matching degree of the candidate transition type. Inthis way, the matching degree of the candidate transition type afterbeing added with the first adjustment coefficient differs enormouslyfrom the matching degrees of other candidate transition types in termsof magnitude, and it is not within a selectable matching degree rangethat the target transition type should have.

For example, for 3 transition positions in the video, transitionposition 1 is set as the designated transition position, the matchingdegrees of 5 candidate transition types at transition position 1 arerespectively 0.11, 0.23, 0.13, 0.09, and 0.15, candidate transitiontypes 1, 3, 4, and 5 are set as designated transition types, and thefirst adjustment coefficient whose magnitude differs greatly from themagnitudes of the above matching degrees is set as −100. In this case,since candidate transition type 2 is not the designated transition typefor transition position 1, the matching degree of candidate transitiontype 2 at transition position 1 is added with the first adjustmentcoefficient. Accordingly, the matching degrees of the 5 candidatetransition types at transition position 1 are 0.11, −99.77, 0.13, 0.09,and 0.15, respectively. As can be seen, the adjusted matching degree ofcandidate transition type 2 is much lower than the matching degrees ofother candidate transition types, and it is not within a selectablematching degree range that the target transition type should have.

In another possible design, if the target transition type occurs at thetransition position, the number of occurrences of the target transitiontype should be less than a first specified number of times, and/or thenumber of consecutive occurrences of the target transition type shouldbe less than a second specified number of times.

Further, when the candidate transition type occurs at the transitionposition, if the number of occurrences of the candidate transition typeis greater than or equal to the first specified number of times, and/orthe number of consecutive occurrences of the candidate transition typeis greater than or equal to the second specified number of times, asecond adjustment coefficient is added to the matching degree of thecandidate transition type. The second adjustment coefficient is used tomake the candidate transition type excluded for the target transitiontype. In other words, if the number of occurrences of a candidatetransition type at the transition positions reaches the first specifiednumber of times, and/or the number of consecutive occurrences of thecandidate transition type at the transition positions reaches the secondspecified number of times, it is determined that the candidatetransition type is not the target transition type.

Similar to the above-mentioned scheme of adding the first adjustmentcoefficient, the magnitude of the second adjustment coefficient is alsomuch larger than the magnitudes of the matching degrees of the candidatetransition types. In this way, the matching degree of the candidatetransition type after being added with the second adjustment coefficientdiffers enormously from the matching degrees of other candidatetransition types in terms of magnitude, and it is not within theselectable matching degree range that the target transition type shouldhave.

In summary, the designated transition position, the designatedtransition type, the first specified number of times, and the secondspecified number of times, etc. may all be set based on the needs ofvideo editing, thereby further adapting to the actual editing needs andproviding suitable transition effects at the transition positions.

Finally, based on the adjusted matching degree(s) and the matchingdegree(s) that do/does not need to be adjusted, the target transitiontype is selected for the transition position.

Embodiment 4

On the basis of Embodiment 3, in a possible design, for each transitionposition, a candidate transition type with the greatest matching degreemay be directly selected as its target transition type.

In another possible design, when the transition position is a firsttransition position of the video, the matching degree of the candidatetransition type at the first transition position may be determined as alargest matching degree of the candidate transition type at thetransition position. When the transition position is a non-firsttransition position of the video, based on the matching degree of thecandidate transition type at this transition position, and based onrespective largest matching degrees of the candidate transition type andother candidate transition types at a previous transition positionpreceding this transition position in the video, a largest matchingdegree of the candidate transition type at this transition position isdetermined, and a candidate transition type that should be selected forthe previous transition position when this transition position has thelargest matching degree is determined. Based on the respective largestmatching degrees of this candidate transition type and other candidatetransition types at each of the non-first transition positions, andbased on a candidate transition type that should be selected for theprevious transition position preceding each of the non-first transitionpositions when this non-first transition position obtains its largestmatching degree, a corresponding target transition type is selected foreach transition position of the video.

Such steps may be implemented based on a dynamic planning algorithm. Thedynamic planning algorithm generally needs to construct a retrievalstructure. In the retrieval structure, each candidate transition type ateach transition position corresponds to one element. For any candidatetransition type at any transition position, the element includes thelargest matching degree of the candidate transition type at thetransition position, and the largest matching degree is determined basedon the matching degree of the candidate transition type at thetransition position obtained in Embodiments 1 to 3 and the respectivelargest matching degrees of the candidate transition type and othercandidate transition types at the previous transition position precedingthe transition position in the video. Of course, for the firsttransition position of the video, it does not have a previous transitionposition, and the largest matching degree of the candidate transitiontype at the first transition position may be directly determined as thematching degree of the candidate transition type at the first transitionposition obtained in Embodiments 1 to 3.

Further, for a candidate transition type at a non-first transitionposition, all candidate transition types at its previous transitionposition correspond to their own largest matching degrees; when acandidate transition type is selected for the previous transitionposition, if the sum of the largest matching degree corresponding to theselected candidate transition type at the previous transition positionand the matching degree corresponding to the concerned candidatetransition type at this non-first transition position is the largest,the information about selecting the candidate transition type for theprevious transition position is also included as part of the element forthe concerned candidate transition type at the non-first transitionposition. Finally, an optimal solution is retrieved in this retrievalstructure with the dynamic planning algorithm. The establishment of theretrieval structure and the use of the dynamic planning algorithm areexplained in detail in Embodiment 10 of the present disclosure, whichwill not be repeated here.

Embodiment 5

FIG. 3 shows a flowchart of a transition type determination methodaccording to yet another embodiment of the present disclosure.

As shown in FIG. 3 , the flow of the transition type determinationmethod according to yet another embodiment of the present disclosureincludes steps as follows.

At step 302, a picture matching degree of each of multiple candidatetransition types at each transition position of the video is acquired,and respective music matching degrees of the multiple candidatetransition types are acquired.

At step 304, for each candidate transition type, weighting processing isperformed on its music matching degree and its picture matching degreeat each transition position, to obtain the matching degree of thecandidate transition type at each transition position.

Specifically, weights may be set for the music matching degree and thepicture matching degree respectively. Based on the weights, weightingprocessing is performed on the music matching degree and the picturematching degree of each of the multiple candidate transition types ateach transition position, to obtain the fitness of each candidatetransition type at each transition position.

Of course, in this disclosure, the approaches for obtaining the matchingdegree based on the music matching degree and the picture matchingdegree include, but are not limited to, the above-mentioned weightingprocessing, and may also include any calculation method meeting actualneeds, such as variance processing, standard deviation processing, andmathematical modeling.

At step 306, according to the matching degrees of the multiple candidatetransition types at each transition position, a target transition typeis selected from the multiple candidate transition types for eachtransition position.

For any candidate transition type at any transition position, thematching degree therefor obtained through weighting processing canaccurately and reliably show the overall fitness of the candidatetransition type to the background music of the video and to the picturesof two video clips corresponding to the transition position.

With such an accurate and reliable matching degree, the fitness of thetarget transition type finally selected for the transition position isalso improved. As a result, it is possible to automatically select atransition type with high fitness and the best transition effect for thetransition position, which not only reduces the difficulty inimplementing video transitions, but also enables high-quality videotransition effects.

Embodiment 6

FIG. 4 shows a flowchart of a transition type determination methodaccording to still another embodiment of the present disclosure.

As shown in FIG. 4 , the flow of the transition type determinationmethod according to still another embodiment of the present disclosureincludes steps as follows.

At step 402, a picture matching degree of each of multiple candidatetransition types at each transition position of the video is acquired,and respective music matching degrees of the multiple candidatetransition types are acquired.

At step 404, respective matching degrees of the multiple candidatetransition types at each transition position are determined, based onthe acquired picture matching degrees and the acquired music matchingdegrees.

For any candidate transition type at any transition position, theoverall fitness, i.e., the matching degree, of the candidate transitiontype at the transition position may be determined based on the fitnessof the candidate transition type to the pictures of two video clipscorresponding to the transition position in combination with the fitnessof the candidate transition type to the background music of the video.In other words, for any candidate transition type at any transitionposition, the matching degree of the candidate transition type at thetransition position accurately and reliably shows the overall fitness ofthe candidate transition type to the background music of the video andto the pictures of the two video clips corresponding to the transitionposition. With the accurate and reliable matching degrees of theindividual candidate transition types with the transition position, thefitness of the target transition type finally selected for thetransition position is also improved.

Specifically, the approaches for obtaining the matching degree based onthe music matching degree and the picture matching degree include, butare not limited to, weighting processing, and may also include anycalculation method meeting actual needs, such as variance processing,standard deviation processing, and mathematical modeling.

At step 406, based on a predetermined transition type selection strategyand the matching degrees of the multiple candidate transition types ateach transition position, a target transition type is selected from themultiple candidate transition types for each transition position.

A predetermined transition type selection strategy may be set, whileconsidering the matching degrees of the multiple candidate transitiontypes at each transition position. The predetermined transition typeselection strategy defines a specific condition that the transitiontypes should meet for meeting requirements of an actual transitioneffect. The use of the predetermined transition type selection strategyhelps to make the finally selected transition type produce a goodtransition effect consequently, and have higher fitness to thetransition position and even the entire video.

In a possible design, the predetermined transition type selectionstrategy includes, but is not limited to, any one or a combination ofthe following: a strategy that defines whether a transition type isallowed or prohibited to occur at a designated transition position, anda strategy that defines the number of occurrences of a transition type.The strategy limiting the number of occurrences of a transition typeincludes that: the number of occurrences of a first transition type isless than the first specified number of times, and/or the number ofconsecutive occurrences of a second transition type is less than thesecond specified number of times.

Taking a case where there are 5 candidate transition types, 4 videoclips of the video, and 3 transition positions as an example, the 5candidate transition types are respectively transition type 0,transition type 1, transition type 2, transition type 3 and transitiontype 4, and the transition positions are respectively transitionposition 0, transition position 1 and transition position 2. Thepredetermined transition type selection strategy may include that:transition type 2 is prohibited from occurring at transition position 0and transition position 2, transition type 1 is prohibited fromoccurring twice, and transition type 2 is prohibited from consecutivelyoccurring twice.

Embodiment 7

Based on any of the foregoing embodiments, FIG. 5 shows a flowchart of atransition type determination method according to still yet anotherembodiment of the present disclosure.

As shown in FIG. 5 , the flow of the transition type determinationmethod according to still yet another embodiment of the presentdisclosure includes steps as follows.

At step 502, a picture matching degree of each of multiple candidatetransition types at each transition position of the video is acquired,and respective music matching degrees of the multiple candidatetransition types are acquired.

At step 504, respective matching degrees of the multiple candidatetransition types at each transition position are determined, based onthe acquired picture matching degrees and the acquired music matchingdegrees.

At step 506, according to the respective matching degrees of themultiple candidate transition types at each transition position, atarget transition type meeting the predetermined transition typeselection strategy is selected from the multiple candidate transitiontypes for each transition position.

In the above technical solution, for any transition position, thematching degrees corresponding to multiple candidate transition types atthis transition position may be determined first. On this basis, incombination with the matching degree corresponding to each candidatetransition type, it may be determined whether each transition type meetsthe predetermined transition type selection strategy.

In a possible design, for any transition position, if only one candidatetransition type meets the predetermined transition type selectionstrategy, this candidate transition type is set as the target transitiontype for the transition position.

In another possible design, for any transition position, if two or morecandidate transition types meet the predetermined transition typeselection strategy, a candidate transition type with the largestmatching degree is selected from the candidate transition types meetingthe predetermined transition type selection strategy, as the targettransition type for the transition position.

In yet another possible design, for any transition position, thematching degrees corresponding to the multiple candidate transitiontypes at the transition position are ranked in a descending order. It isfirst determined whether the candidate transition type corresponding tothe largest matching degree meets the predetermined transition typeselection strategy. If yes, the candidate transition type correspondingto the largest matching degree is determined as the target transitiontype. And if not, the candidate transition type corresponding to thelargest matching degree is discarded, and it is determined whether thecandidate transition type corresponding to the second largest matchingdegree meets the predetermined transition type selection strategy, andso on, until a matching degree whose corresponding candidate transitiontype meets the predetermined transition type selection strategy isselected. The candidate transition type corresponding to the selectedmatching degree and meeting the predetermined transition type selectionstrategy is determined as the target transition type for the transitionposition.

Taking a case where there are 5 candidate transition types, 4 videoclips of the video, and 3 transition positions as an example, the 5candidate transition types are respectively transition type 0,transition type 1, transition type 2, transition type 3, and transitiontype 4, and the transition positions are respectively transitionposition 0, transition position 1 and transition position 2. The picturematching degrees of the individual candidate transition types at eachtransition position are shown in Table 1 below.

TABLE 1 Transition type 0 Transition type 1 Transition type 2 Transitiontype 3 Transition type 4 Transition 0.4 0.1 0.2 0.17 0.13 position 0Transition 0.1 0.35 0.15 0.2 0.2 position 1 Transition 0.3 0.4 0.12 0.080.1 position 2

The music matching degrees of the individual candidate transition typeswith the background music of the video are shown in Table 2 below.

TABLE 2 Transition type 0 Transition type 1 Transition type 2 Transitiontype 3 Transition type 4 0.2 0.15 0.3 0.25 0.15

The weight of the picture matching degree is preset as 0.4, and theweight of the music matching degree is preset as 0.6. For each candidatetransition type, weighting processing is performed on the music matchingdegree of the candidate transition type and the picture matching degreeof the candidate transition type at each transition position, to obtainthe matching degree S(i, j) of the candidate transition type at eachtransition position.

Among them, i represents the transition position, and the range ofvalues for i is (0, 1, 2); j represents the candidate transition type,and the range of values for j is (0, 1, 2, 3, 4).

S(0, 0)=0.4×0.4+0.6×0.2/3=0.2

S(0, 1)=0.4×0.1+0.6×0.15/3=0.07

S(0, 2)=0.4×0.2+0.6×0.3/3=0.14

S(0, 3)=0.4×0.17+0.6×0.25/3=0.118

S(0, 4)=0.4×0.13+0.6×0.15/3=0.082

S(1, 0)=0.4×0.1+0.6×0.2/3=0.08

S(1, 1)=0.4×0.35+0.6×0.15/3=0.17

S(1, 2)=0.4×0.15+0.6×0.3/3=0.12

S(1, 3)=0.4×0.2+0.6×0.25/3=0.13

S(1, 4)=0.4×0.2+0.6×0.15/3=0.11

S(2, 0)=0.4×0.3+0.6×0.2/3=0.16

S(2, 1)=0.4×0.4+0.6×0.15/3=0.19

S(2, 2)=0.4×0.12+0.6×0.3/3=0.108

S(2, 3)=0.4×0.08+0.6×0.25/3=0.082

S(2, 4)=0.4×0.1+0.6×0.15/3=0.07

The S(i,j) obtained above are shown in Table 3 below.

TABLE 3 Transition type 0 Transition type 1 Transition type 2 Transitiontype 3 Transition type 4 Transition 0.2 0.07 0.14 0.118 0.082 position 0Transition 0.08 0.17 0.12 0.13 0.11 position 1 Transition 0.16 0.190.108 0.082 0.07 position 2

The predetermined transition type selection strategy may be set asfollows: transition type 2 is prohibited from occurring at transitionposition 0 and transition position 2, and transition type 1 isprohibited from occurring twice.

In a possible design, according to a sequence from transition position 0to transition position 2, the target transition types are respectivelyselected for the three transition positions.

Among them, for transition position 0, the largest matching degree S(0,0) at this transition position corresponds to transition type 0. At thistime, transition type 2 does not occur at transition position 0; andsince it is the first transition position, there is not a case wheretransition type 1 occurs twice. Therefore, transition type 0 isdetermined as the target transition type for transition position 0.

For transition position 1, the largest matching degree S(1, 1) at thistransition position corresponds to transition type 1. At this time,transition type 2 does not occur at transition position 1; and since thetarget transition type at the previous transition position 0 istransition type 0, transition type 1 occurs for the first time at thecurrent transition position 1, and there is not a case where transitiontype 1 occurs twice. Therefore, transition type 1 is determined as thetarget transition type for transition position 1.

For transition position 2, the largest matching degree S(2, 1) at thistransition position corresponds to transition type 1. At this time,transition type 2 does not occur at transition position 2; however,since the target transition type at the previous transition position 1is transition type 1, transition type 1 occurs for the second time atthe current transition position 2, which does not meet the requirementin the predetermined transition type selection strategy that transitiontype 1 is prohibited from occurring twice. In this case, the largestmatching degree S(2, 1) is discarded, and it continues to makedetermination on the second largest matching degree S(2, 0) fortransition position 2. S(2, 0) corresponds to transition type 0, wheretransition type 2 does not occur, and the requirement in thepredetermined transition type selection strategy that transition type 1is prohibited from occurring twice is met. Therefore, transition type 0is determined as the target transition type for transition position 2.

In another possible design, according to a reverse order from transitionposition 2 to transition position 0, the target transition types arerespectively selected for the three transition positions.

Among them, for transition position 2, the largest matching degreeS(2, 1) at this transition position corresponds to transition type 1. Atthis time, transition type 2 does not occur at transition position 2;and since transition type 1 occurs for the first time, there is not acase where transition type 1 occurs twice. Therefore, transition type 1is determined as the target transition type for transition position 2.

For transition position 1, the largest matching degree S(1, 1) at thistransition position corresponds to transition type 1. At this time,transition type 2 does not occur at transition position 1; however,since the target transition type at the previous transition position 2is transition type 1, transition type 1 occurs for the second time atthe current transition position 1, which does not meet the requirementin the predetermined transition type selection strategy that transitiontype 1 is prohibited from occurring twice. In this case, the largestmatching degree S(1, 1) is discarded, and it continues to makedetermination on the second largest matching degree S(1, 3) fortransition position 1. S(1, 3) corresponds to transition type 3, wheretransition type 2 does not occur, and the requirement in thepredetermined transition type selection strategy that transition type 1is prohibited from occurring twice is met. Therefore, transition type 3is determined as the target transition type for transition position 1.

For transition position 0, the largest matching degree S(0, 0) at thistransition position corresponds to transition type 0. At this time,transition type 2 does not occur at transition position 0, and there isnot a case where transition type 1 occurs twice. Therefore, transitiontype 0 is determined as the target transition type for transitionposition 0.

Embodiment 8

On the basis of Embodiment 7, FIG. 6 shows a flowchart of a transitiontype determination method according to still yet another embodiment ofthe present disclosure.

As shown in FIG. 6 , the flow of the transition type determinationmethod according to still yet another embodiment of the presentdisclosure includes steps as follows.

At step 602, a picture matching degree of each of multiple candidatetransition types at each transition position of the video is acquired,and respective music matching degrees of the multiple candidatetransition types are acquired.

At step 604, respective matching degrees of the multiple candidatetransition types at each transition position are determined, based onthe acquired picture matching degrees and the acquired music matchingdegrees.

At step 606, the matching degrees of some or all of the candidatetransition types at least one transition position are adjusted,according to the predetermined transition type selection strategy.

The predetermined transition type selection strategy defines a specificcondition that the transition types should meet for meeting requirementsof an actual transition effect. The use of the predetermined transitiontype selection strategy helps to make the finally selected transitiontype produce a good transition effect consequently, and have higherfitness to the transition position and even the entire video. Thepredetermined transition type selection strategy includes, but is notlimited to, one or a combination of the following: a strategy thatdefines whether a transition type is allowed or prohibited to occur at adesignated transition position, and a strategy that defines the numberof occurrences of a transition type. The strategy limiting the number ofoccurrences of a transition type includes but is not limited to thefollowing: the number of occurrences of a first transition type is lessthan the first specified number of times, and/or the number ofconsecutive occurrences of a second transition type is less than thesecond specified number of times.

In order to facilitate subsequent calculations and reduce the difficultyof automatically selecting the transition type, a predetermined matchingdegree adjustment strategy may be added to the calculation process inthe form of a matching degree adjustment coefficient.

For example, in the predetermined matching degree adjustment strategy,it is defined that the number of occurrences of the first transitiontype cannot reach the first specified number of times. For anytransition position, if the number of occurrences of the firsttransition type at this transition position is less than the firstspecified number of times, it may be set that a first coefficient issubtracted from the matching degree of the first transition type at thetransition position. For any transition position, if the number ofoccurrences of the first transition type at this transition position isgreater than or equal to the first specified number of times, it may beset that a second coefficient is subtracted from the matching degree ofthe first transition type at the transition position. Among them, thefirst coefficient is much smaller than the second coefficient.

Further, the first coefficient may be set as 0, and the secondcoefficient may be set as 100. In this way, for any transition position,if the first transition type is selected therefor, and the number ofoccurrences of the first transition type reaches the first specifiednumber of times, 100 is subtracted from the matching degreecorresponding to the first transition type at the transition position;and if another transition type other than the first transition type isselected for the transition position, 0 is subtracted from the matchingdegree corresponding to the another transition type at the transitionposition. In the end, the adjusted matching degree corresponding to thefirst transition type will be much smaller than the adjusted matchingdegrees corresponding to other transition types. Thus, when the targettransition type is selected for this transition position based on theadjusted matching degrees, the first transition type whose adjustedmatching degree is minimal will certainly not be selected.

At step 608, according to the adjusted matching degrees of the multiplecandidate transition types at each transition position, a targettransition type is selected from the multiple candidate transition typesfor each transition position.

The adjusted matching degree based on the predetermined matching degreeadjustment strategy reflects the fitness of the transition type to thetransition position under a condition that the transition type at thetransition positions and/or the transition position meets requirementsof an actual transition effect. The higher the adjusted matching degreeof a transition type at the transition position, the better thetransition effect obtained by using the transition type at thetransition position. Through the above technical solution, a transitiontype with high fitness to a transition position and enabling ahigh-quality transition effect can be automatically selected for thetransition position, which not only reduces the difficulty inimplementing video transition, but also enables high-quality videotransition effects, improving the user experience.

Embodiment 9

FIG. 7 shows a flowchart of a transition type determination methodaccording to still yet another embodiment of the present disclosure.

As shown in FIG. 7 , the flow of the transition type determinationmethod according to still yet another embodiment of the presentdisclosure includes steps as follows.

At step 702, a picture matching degree of each of multiple candidatetransition types at each transition position of the video is acquired,and respective music matching degrees of the multiple candidatetransition types are acquired.

At step 704, respective matching degrees of the multiple candidatetransition types at each transition position are determined, based onthe acquired picture matching degrees and the acquired music matchingdegrees.

At step 706, a transition type retrieval structure is constructed,according to the matching degrees of the multiple candidate transitiontypes at each transition position.

At step 708, a target transition type is selected for each transitionposition by using the transition type retrieval structure.

In a possible design, the transition type retrieval structure may beconstructed by directly using the matching degrees of the multiplecandidate transition types at each transition position as elements.

In the case where the transition type retrieval structure is constructedby directly using the matching degrees of the multiple candidatetransition types at each transition position as elements, for eachtransition position, a candidate transition type with the highestmatching degree may be retrieved from the transition type retrievalstructure, as the corresponding target transition type.

In another possible design, the transition type retrieval structure maybe constructed by: adjusting, based on the predetermined transition typeselection strategy, the matching degrees of the multiple candidatetransition types at each transition position, and taking, as elements,the adjusted matching degrees of the multiple candidate transition typesat each transition position.

In this case, the adjusted matching degree reflects the fitness of thetransition type to the transition position under a condition that thetransition type meets requirements of an actual transition effect. Thehigher the adjusted matching degree of a transition type at thetransition position, the better the transition effect obtained by usingthe transition type at the transition position.

In yet another possible design, for any candidate transition type at anytransition position, when the candidate transition type is selected asthe target transition type for this transition position, for a previoustransition position preceding this transition position, a candidatetransition type, the sum of its matching degree at the previoustransition position and the matching degree of the concerned candidatetransition type at this transition position being the largest, isselected.

In this case, the transition type retrieval structure is constructed by:for any candidate transition type at any transition position, taking, asthe structural elements, the matching degree of this candidatetransition type, and a candidate transition type whose matching degreeat the previous transition position plus the matching degree of thiscandidate transition type yields the largest sum. In this transitiontype retrieval structure, no matter which one of the multiple candidatetransition types is selected as the target transition type for theinitial transition position processed for the first time, a candidatetransition type that enables a high-quality overall transition effectcan be selected for each of other transition positions when selectingthe target transition type.

In still yet another possible design, the matching degrees of themultiple candidate transition types at each transition position may beadjusted based on the predetermined transition type selection strategy.Next, for any candidate transition type at any transition position, whenthis candidate transition type is selected as the target transition typefor this transition position, for a previous transition positionpreceding this transition position, a candidate transition type, the sumof its matching degree at the previous transition position and thematching degree of this candidate transition type at this transitionposition being the largest, is selected.

In this way, the transition type retrieval structure is constructed by:for any candidate transition type at any transition position, taking, asthe structural elements, the adjusted matching degree of this candidatetransition type, and a candidate transition type whose adjusted matchingdegree at the previous transition position plus the adjusted matchingdegree of this candidate transition type yields the largest sum. In thistransition type retrieval structure, no matter which one of the multiplecandidate transition types is selected as the target transition type forthe initial transition position processed for the first time, acandidate transition type that enables an optimum overall transitioneffect can be selected for each of other transition positions whenselecting the target transition type.

Embodiment 10

In the technical solutions of the present disclosure, the targettransition type may be selected for each transition position byperforming retrieval in the transition type retrieval structure with apredetermined algorithm. The predetermined algorithm includes, but isnot limited to, dynamic planning algorithm, depth-first algorithm,hill-climbing algorithm, ant colony algorithm, particle swarm algorithm,and any other algorithm capable of selecting an optimal solution.

The dynamic planning algorithm for the transition type retrievalstructure may be constructed by: based on historical selectable matchingdegrees at each transition position and the adjusted matching degrees ofmultiple candidate transition types at the transition position,determining respective selectable matching degrees corresponding to themultiple candidate transition types at each transition position.

Among them, the historical selectable matching degrees of the firsttransition position among the multiple transition positions are zero.For each of remaining transition positions in the multiple transitionpositions other than the first transition position, its historicalselectable matching degrees are the specified selectable matchingdegrees of its own previous transition position. Specifically, the sumof the adjusted matching degree of each candidate transition type ateach remaining transition position and each of the selectable matchingdegrees of its previous transition position under the multiple candidatetransition types is calculated, and a selectable matching degreecorresponding to the largest sum is a specified selectable match degreeof the previous transition position preceding the remaining transitionposition.

Finally, the transition type retrieval structure is constructed bytaking the following as structural elements: the selectable matchingdegree corresponding to each of the multiple candidate transition typesat each transition position, and a historical transition position and ahistorical candidate transition type that correspond to a historicalselectable matching degree used when the concerned selectable matchingdegree is determined.

The construction of the transition type retrieval structure and theprocess of retrieving in the transition type retrieval structure withthe dynamic planning algorithm are described in detail below withreference to an example.

Taking a case where there are 5 candidate transition types, 4 videoclips of the video, and 3 transition positions as an example, the 5candidate transition types are respectively transition type 0,transition type 1, transition type 2, transition type 3, and transitiontype 4, the transition positions are respectively transition position 0,transition position 1 and transition position 2, and the distribution ofthe picture matching degrees and the music matching degrees are shown inTable 1 and Table 2 above.

The weight of the picture matching degree is preset as 0.4, and theweight of the music matching degree is preset as 0.6. For each candidatetransition type, weighting processing is performed on its own musicmatching degree and its picture matching degree at each transitionposition, to obtain the matching degree S(i, j) of the candidatetransition type at each transition position, as shown in Table 3 above.Among them, i represents the transition position, and the range ofvalues for i is (0, 1, 2); j represents the candidate transition type,and the range of values for j is (0, 1, 2, 3, 4).

The predetermined matching degree adjustment strategy may be set asfollows: transition type 1 is prohibited from occurring at transitionposition 0 and transition position 2, and the same transition type isprohibited from occurring twice.

For any candidate transition type at any transition position, if thiscandidate transition type meets the predetermined matching degreeadjustment strategy, an adjustment coefficient of 0 is subtracted fromthe matching degree of the candidate transition type; and if thiscandidate transition type does not meet the predetermined matchingdegree adjustment strategy, an adjustment coefficient of 100 issubtracted from the matching degree of the candidate transition type.

Based on this, after the matching degrees in Table 3 are adjusted, theadjusted matching degrees Q(i, j) are obtained. Among them, i representsthe transition position, and the range of values for i is (0, 1, 2); jrepresents the candidate transition type, and the range of values for jis (0, 1, 2, 3, 4). That is to say, Q(i, j) is a superimposition valueobtained by adding the weighted value of the picture matching degree oftransition type j at transition position i and the weighted value of themusic matching degree of transition type j at transition position i withthe corresponding adjustment coefficient.

First, the adjusted matching degrees of the individual transition typesat transition position 0 are calculated.

Q(0, 0)=0.4×0.4+0.6×0.2/3−0=0.2

Q(0, 1)=0.4×0.1+0.6×0.15/3−100=−99.93

Q(0, 2)=0.4×0.2+0.6×0.3/3−0=0.14

Q(0, 3)=0.4×0.17+0.6×0.25/3−0=0.118

Q(0, 4)=0.4×0.13+0.6×0.15/3−0=0.082

For transition position 1, it is assumed that transition type j issequentially selected for transition position 1, and correspondingly, itis determined, under the assumed transition type j, which transitiontype should be selected for transition position 0 in such a manner thatthe sum of the matching degrees at transition position 0 and transitionposition 1 is the highest.

Among them, when transition type 0 is selected for transition position1, the largest sum of the matching degrees at transition position 0 andtransition position 1 is as follows:

P _((1, 0))=max{Q(0, j)+0.4×0.1+0.6×0.2/3−cost_(p(1, 0)Q(0, j))};

where cost_(p(1, 0)Q(0, j)) refers to an adjustment coefficient thatshould be used for transition position 1 when transition type j isselected for transition position 0 in a case where transition type 0 isselected for transition position 1.

When transition type 0 is selected for transition position 1, transitiontype 0 occurs twice if transition type 0 is also selected for transitionposition 0, which does not meet the predetermined matching degreeadjustment strategy. At this time, cost_(p(1, 0)Q(0, 0)) correspondingto Q(1, 0) is 100. Otherwise,

if transition type 1 is selected for transition position 0,cost_(p(1, 0)Q(0, 1)) corresponding to Q(1, 0) is 0;

if transition type 2 is selected for transition position 0,cost_(p(1, 0)Q(0, 2)) corresponding to Q(1, 0) is 0;

if transition type 3 is selected for transition position 0,cost_(p(1, 0)Q(0, 3)) corresponding to Q(1, 0) is 0; and

if transition type 4 is selected for transition position 0,cost_(p(1, 0)Q(0, 4)) corresponding to Q(1, 0) is 0.

Correspondingly,

Q(0, 0)+0.4×0.1+0.6×0.2/3−100=−99.72

Q(0, 1)+0.4×0.1+0.6×0.2/3−0=−99.85

Q(0, 2)+0.4×0.1+0.6×0.2/3−0=0.22

Q(0, 3)+0.4×0.1+0.6×0.2/3−0=0.198

Q(0, 4)+0.4 ×0.1+0.6×0.2/3−0=0.162

Therefore, when j=2, that is to say, when transition type 0 is selectedfor transition position 1 and transition type 2 is selected fortransition position 0, the sum of the matching degrees at transitionposition 0 and transition position 1 is the largest, where

P _((1, 0))=max{Q(0, j)+0.4×0.1+0.6×0.2/3−cost_(p(1, 0)Q(0, j))}=0.22.

Then, the structural element corresponding to transition type 0 attransition position 1 may be set as {(0, 2), 0.22}, which shows thattransition position 0 and transition position 1 can obtain the besttransition effects on a whole when transition type 0 is selected forcurrent transition position 1 and transition type 2 is selected forprevious transition position 0.

Similarly, when transition type 1 is selected for transition position 1,the largest sum of the matching degrees at transition position 0 andtransition position 1 is as follows:

P _((1, 1))=max{Q(0, j)+0.4×0.35+0.6×0.15/3−cost_(p(1, 1)Q(0, j))}.

When j=0, P_((1, 1)) has a largest value of 0.37. Thus, the structuralelement corresponding to transition type 1 at transition position 1 isset as {(0, 0), 0.37}.

Similarly, when transition type 2 is selected for transition position 1,the largest sum of the matching degrees of transition position 0 andtransition position 1 is as follows:

P _((1, 2))=max{Q(0, j)+0.4×0.15+0.6×0.3/3−cost_(p(1, 2)Q(0, j))}.

When j=0, P_((1, 2)) has a largest value of 0.32. Thus, the structuralelement corresponding to transition type 2 at transition position 1 isset as {(0, 0), 0.32}.

Similarly, when transition type 3 is selected for transition position 1,the largest sum of the matching degrees at transition position 0 andtransition position 1 is as follows:

P _((1, 3))=max{Q(0, j)+0.4×0.2+0.6×0.25/3−cost_(p(1, 3)Q(0, j))}.

When j=0, P_((1, 3)) has a largest value of 0.33. Thus, the structuralelement corresponding to transition type 3 at transition position 1 isset as {(0, 0), 0.33}.

Similarly, when transition type 4 is selected for transition position 1,the largest sum of the matching degrees at transition position 0 andtransition position 1 is as follows:

P _((1, 4))=max{Q(0, j)+0.4×0.2+0.6×0.15/3−cost_(p(1, 4)Q(0, j))}.

When j=0, P_((1, 4)) has a largest value of 0.31. Thus, the structuralelement corresponding to transition type 4 at transition position 1 isset as {(0, 0), 0.31}.

A part of the transition type retrieval structure constructed above isshown in Table 4 below.

TABLE 4 Transition position — — — — — 0 Transition position (0, 2), 0.22(0, 0), 0.37 (0, 0), 0.32 (0, 0), 0.33 (0, 0), 0.31 1

At this time, Q(1, 0), Q(1, 1), Q(1, 2), Q(1, 3), and Q(1, 4) are set as0.22, 0.37, 0.32, 0.33, and 0.31, respectively.

For transition position 2, when transition type 0 is selected therefor,if transition type 0 is selected for transition position 1 at this time,transition type 0 occurs twice, which does not meet the predeterminedmatching degree adjustment strategy. Thus, cost_(p(2, 0)Q(1, 0))corresponding to Q(2, 0) is 100.

As can be seen in combination with Table 4, if transition type 1, 2, 3,or 4 is selected for transition position 1 at this time, it willinevitably lead to the selection of transition type 0 for transitionposition 0. In this case, transition type 0 still occurs twice. Thus,cost_(p(2, 0)Q(1, 1)), cost_(p(2, 0)Q(1, 2)), cost_(p(2, 0)Q(1, 3)) andcost_(p(2, 0)Q(1, 4)) corresponding to Q(2, 0) are all 100.

Therefore, for transition position 2, when transition type 0 is selectedtherefor, the largest sum of the matching degrees at transition position1 and transition position 2 is as follows:

P _((2, 0))=max{Q(1, j)+0.4×0.3+0.6×0.2/3−100}.

When j=1, P_((2, 0)) has a largest value −99.47. Thus, the structuralelement corresponding to transition type 0 at transition position 2 isset as {(1, 1), −99.47}.

It may be supplemented that, the two predetermined matching degreeadjustment strategies, i.e., transition type 1 being prohibited fromoccurring at transition position 0 and transition position 2, andtransition type 1 being prohibited from occurring twice, correspond totheir respective adjustment coefficients cost. For any transition typeat any transition position, if it does not meet both the twopredetermined matching degree adjustment strategies, the respectiveadjustment coefficients cost corresponding to the two predeterminedmatching degree adjustment strategies are all subtracted from thematching degree of the transition type.

For transition position 2, when transition type 1 is selected therefor:

As can be seen in combination with Table 4, if transition type 0 isselected for transition position 1 at this time, transition type 2 isselected for transition position 0. In this case, transition type 1 doesnot occur twice, but transition type 1, which is forbidden fromoccurring at transition position 2, occurs at transition position 2.Thus, cost_(p(2, 1)Q(1, 0)) is 100.

As can be seen in combination with Table 4, if transition type 1 isselected for transition position 1 at this time, it will inevitably leadto the selection of transition type 0 for transition position 0. In thiscase, transition type 1 occurs twice, and transition type 1, which isforbidden from occurring at transition position 2, occurs at transitionposition 2. At this time, both the two predetermined matching degreeadjustment strategies are not met. Thus, cost_(p(2, 1)Q(1, 1)) is 200.

As can be seen in combination with Table 4, if transition type 2, 3, or4 is selected for transition position 1 at this time, it will inevitablylead to the selection of transition type 0 for transition position 0. Inthis case, the transition type 1 does not occur twice, but transitiontype 1, which is forbidden from occurring at transition position 2,occurs at transition position 2. Thus, cost_(p(2, 1)Q(1, 2)),cost_(p(2, 1)Q(1, 3)), cost_(p(2, 1)Q(1, 4)) are all 100.

P _((2, 1))=max{Q(1, j)+0.4×0.4+0.6×0.15/3−cost_(p(2, 1)Q(1, j))}.

When j=3, P_((2, 1)) has a largest value of −99.51. Thus, the structuralelement corresponding to transition type 1 at transition position 2 isset as {(1, 3), −99.51}.

For transition position 2, when transition type 2 is selected therefor:

If transition type 0 is selected for transition position 1 at this time,referring to Table 4, it will inevitably lead to the selection oftransition type 2 for transition position 0. In this case, transitiontype 2 occurs twice. Thus, cost_(p(2, 2)Q(1, 0)) is 100.

If transition type 2 is selected for transition position 1 at this time,referring to Table 4, it will inevitably lead to the selection oftransition type 0 for transition position 0. In this case, transitiontype 2 occurs twice. Thus, cost_(p(2, 2)Q(1, 2)) is 100.

If transition type 1, 3, or 4 is selected for transition position 1 atthis time, referring to Table 4, it will inevitably lead to theselection of transition type 0 for transition position 0. In this case,the predetermined matching degree adjustment strategies are met. Thus,cost_(p(2, 2)Q(1, 1)), cost_(p(2, 2)Q(1, 3)), cost_(p(2, 2)Q(1, 4)) areall 0.

P _((2, 2))=max{Q(1, j)+0.4×0.12+0.6×0.3/3−cost_(p(2, 2)Q(1, j))}.

When j=1, P_((2, 2)) has a largest value of 0.478. Thus, the structuralelement corresponding to transition type 1 at transition position 2 isset as {(1, 1), 0.478}.

For transition position 2, when transition type 3 is selected therefor:

If transition type 0 is selected for transition position 1 at this time,referring to Table 4, it will inevitably lead to the selection oftransition type 2 for transition position 0. In this case, thepredetermined matching degree adjustment strategies are met. Thus,cost_(p(2, 3)Q(1, 0)) is 0.

If transition type 1, 2, or 4 is selected for transition position 1 atthis time, referring to Table 4, it will inevitably lead to theselection of transition type 0 for transition position 0. In this case,the predetermined matching degree adjustment strategies are met. Thus,cost_(p(2, 3)Q(1, 1)), cost_(p(2, 3)Q(1, 2)), and cost_(p(2, 3)Q(1, 4))are all 0.

If transition type 3 is selected for transition position 1 at this time,referring to Table 4, it will inevitably lead to the selection oftransition type 0 for transition position 0. In this case, transitiontype 3 occurs twice, only one predetermined matching degree adjustmentstrategy is not met. Thus, cost_(p(2, 2)Q(1, 3)) is 100.

P _((2, 3))=max{Q(1, j)+0.4×0.08+0.6×0.25/3−cost_(p(2, 3)Q(1, j))}.

When j=1, P_((2, 3)) has a largest value of 0.452. Thus, the structuralelement corresponding to transition type 3 at transition position 2 isset as {(1, 1), 0.452}.

For transition position 2, when transition type 4 is selected therefor:

If transition type 0 is selected for transition position 1 at this time,referring to Table 4, it will inevitably lead to the selection oftransition type 2 for transition position 0. In this case, thepredetermined matching degree adjustment strategies are met. Thus,cost_(p(2, 4)Q(1, 0)) is 0.

If transition type 1, 2, or 3 is selected for transition position 1 atthis time, referring to Table 4, it will inevitably lead to theselection of transition type 0 for transition position 0. In this case,the predetermined matching degree adjustment strategies are met. Thus,cost_(p(2, 4)Q(1, 1)), cost_(p(2, 4)Q(1, 2)), and cost_(p(2, 4)Q(1, 3))are all 0.

If transition type 4 is selected for transition position 1 at this time,referring to Table 4, it will inevitably lead to the selection oftransition type 0 for transition position 0. In this case, transitiontype 4 occurs twice, and only one predetermined matching degreeadjustment strategy is not met. Thus, cost_(p(2, 4)Q(1, 4)) is 100.

P _((2, 4))=max{Q(1, j)+0.4×0.1+0.6×0.15/3−cost_(p(2, 4)Q(1, j))}.

When j=1, P_((2, 4)) has a largest value of 0.44. Thus, the structuralelement corresponding to transition type 4 at transition position 2 isset as {(1, 1), 0.44}. At this time, Q(2, 0), Q(2, 1), Q(2, 2), Q(2, 3),and Q(2, 4) are set as −99.47, −99.51, 0.478, 0.452, and 0.44,respectively.

Finally, the obtained complete transition type retrieval structure isshown in Table 5.

TABLE 5 Transition position — — — — — 0 Transition position (0, 2), 0.22(0, 0), 0.37 (0, 0), 0.32 (0, 0), 0.33 (0, 0), 0.31 1 Transitionposition (1, 1), −99.47 (1,3), −99.51 (1, 1), 0.478 (1, 1), 0.452 (1,1), 0.44 2

Based on Table 5, it can be seen that, at transition position 2,transition type 2 corresponds to the highest matching degree at thistime.

At the same time, based on the structural element {(1, 1), 0.478} fortransition type 2 at transition position 2 in the transition typeretrieval structure, it can be known that the largest sum of thematching degrees is obtained when transition type 1 is selected fortransition position 1, on the premise that transition type 2 is selectedfor transition position 2.

Next, based on the structure element {(0, 0), 0.37} for transition type1 at transition position 1 in the transition type retrieval structure,it can be known that the largest sum of the matching degrees is obtainedwhen transition type 0 is selected for transition position 0, on thepremise that transition type 1 is selected for transition position 1.

Based on the above principle, by retrieving in the transition typeretrieval structure with the dynamic planning algorithm, the finalmatching result for the transition types is obtained as follows:transition type 0 is used at transition position 0, transition type 1 isused at transition position 1, and transition type 2 is used attransition position 2.

In addition, any type of transition type retrieval structure may beconstructed using the matching degrees of multiple candidate transitiontypes at each transition position, and the types of transition typeretrieval structures include but are not limited to the above one. Forany type of transition type retrieval structure, the matching result forthe transition types may be obtained using any search algorithmincluding, but not limited to, the dynamic planning algorithm.

It should be supplemented that the technical solutions of Embodiments 1to 10 may be executed in the Software Development Kit (SDK) of theclient. The client has VE (which is video communication software) SDK,algorithm SDK and effect SDK.

Specifically, the algorithm SDK may acquire respective picture matchingdegrees of multiple candidate transition types at each transitionposition of the video, and respective music matching degrees of themultiple candidate transition types; based on the picture matchingdegrees and the music matching degrees, it may obtain, throughprocessing, the matching degrees of the multiple candidate transitiontypes at each transition position; and finally, it may determine thetarget transition type for each transition position.

Alternatively, the algorithm SDK may acquire respective picture matchingdegrees of multiple candidate transition types at each transitionposition of the video, and respective music matching degrees of themultiple candidate transition types, and send the acquired contents tothe VE SDK. The VE SDK obtains, based on the picture matching degreesand the music matching degrees, the matching degrees of the multiplecandidate transition types at each transition position, and finallydetermines the target transition type for each transition position.Finally, the VE SDK sends the target transition type to the effect SDK,and the effect SDK performs the rendering operation.

Of course, the technical solutions of Embodiments 1 to 10 may also beimplemented in any module or electronic device capable of realizingvideo processing, according to actual needs.

FIG. 8 shows a block diagram of a transition type determinationapparatus according to an embodiment of the present disclosure.

As shown in FIG. 8 , an embodiment of the present disclosure provides atransition type determination apparatus 800, which includes: an initialmatching degree acquisition unit 802, configured to acquire a picturematching degree of a candidate transition type with a transitionposition between two adjacent video clips, and a music matching degreeof the candidate transition type, where the picture matching degree isdetermined according to the two adjacent video clips and the candidatetransition type, and the music matching degree is determined accordingto the candidate transition type and background music of a video towhich the two adjacent video clips belongs; a transition positionmatching degree determination unit 804, configured to determine amatching degree of the candidate transition type at the transitionposition, based on the acquired picture matching degree and the acquiredmusic matching degree; and a target transition type selection unit 806,configured to determine, according to the matching degree, whether todetermine the candidate transition type as a target transition type forthe transition position, where the target transition type is used for atransition effect between the two adjacent video clips.

In the above embodiment of the present disclosure, in an implementation,the target transition type selection unit 806 is further configured to:if the transition position is a designated transition position in thevideo, determine a designated transition type corresponding to thedesignated transition position as the target transition type for thetransition position.

In the above embodiment of the present disclosure, in an implementation,the target transition type selection unit 806 is further configured to:add a first adjustment coefficient to the matching degree of thecandidate transition type, when the transition position is thedesignated transition position in the video and if the candidatetransition type is another transition type other than the designatedtransition type, where the first adjustment coefficient is used to makethe candidate transition type excluded for the target transition type.

In the above embodiment of the present disclosure, in an implementation,if the target transition type occurs at the transition position, thenumber of occurrences of the target transition type should be less thana first specified number of times, and/or the number of consecutiveoccurrences of the target transition type should be less than a secondspecified number.

In the above embodiment of the present disclosure, in an implementation,the target transition type selection unit 806 is further configured to:add a second adjustment coefficient to the matching degree of thecandidate transition type, when the candidate transition type occurs atthe transition position and if the number of occurrences of thecandidate transition type is greater than or equal to the firstspecified number of times, and/or if the number of consecutiveoccurrences of the candidate transition type is greater than or equal tothe second specified number of times, where the second adjustmentcoefficient is used to make the candidate transition type excluded forthe target transition type.

In the above embodiment of the present disclosure, in an implementation,the target transition type selection unit 806 is further configured to:when the transition position is a first transition position of thevideo, determine the matching degree corresponding to the candidatetransition type at the first transition position as a largest matchingdegree of the candidate transition type at this transition position;when the transition position is a non-first transition position of thevideo, determine, based on the matching degree of the candidatetransition type at this transition position, and on respective largestmatching degrees of the candidate transition type and other candidatetransition types at a previous transition position preceding thistransition position in the video, a largest matching degree of thecandidate transition type at this transition position, and a candidatetransition type that should be selected for the previous transitionposition when this transition position obtains its largest matchingdegree; and select a corresponding target transition type for eachtransition position of the video, based on the respective largestmatching degrees of the candidate transition type and other candidatetransition types at each of the non-first transition positions, and onthe candidate transition type that should be selected for a previoustransition position preceding each of the non-first transition positionswhen the non-first transition position obtains its largest matchingdegree.

The transition type determination apparatus 800 uses the solutionsdescribed in any one of Embodiments 1 to 10. Therefore, it has all theabove technical effects, and details of which are not repeated here.

FIG. 9 shows a block diagram of an electronic device according to anembodiment of the present disclosure.

As shown in FIG. 9 , an electronic device 900 according to an embodimentof the present disclosure includes at least one memory 902 and at leastone processor 904 communicatively connected with the at least one memory902. The memory stores instructions executable by the at least oneprocessor 904. The instructions are configured to execute the solutionsdescribed in any one of the foregoing Embodiments 1 to 10. Therefore,the electronic device 900 has the same technical effects as any one ofEmbodiments 1 to 10, which will not be repeated here.

The electronic device of the embodiment of the present disclosure mayexist in various forms, including but is not limited to:

(1) Mobile communication device: this type of device has acharacteristic of mobile communication function, and mainly aims toprovide voice and data communication. Such terminal includes: smartphone (e.g., iPhone), multimedia phone, feature phone, low-end phone,and the like.

(2) Ultra-mobile personal computer device: this type of device belongsto a personal computer, has computing and processing functions, andgenerally has mobile Internet access features. Such terminal includes:Personal Digital Assistant (PDA), Mobile Internet Device (MID), UltraMobile Personal Computer (UMPC) and the like, such as iPad.

(3) Portable entertainment device: this type of device may display andplay multimedia contents. Such device includes: audio and video players(e.g., iPod), handheld game console, e-book, smart toy, and portablevehicle-mounted navigation device.

(4) Other electronic devices with data interaction functions.

In addition, the embodiments of the present disclosure provide anon-transitory computer-readable storage medium storingcomputer-executable instructions, where the computer-executableinstructions are configured to execute the methods described in any oneof the foregoing Embodiments 1 to 10.

Embodiments of the present disclosure further provide a computer programproduct, which includes a computer program carried on acomputer-readable medium. The computer program, when being executed by aprocessor, causes the methods described in any one of the foregoingEmbodiments 1 to 10 to be implemented.

The embodiments of the present disclosure further provide a computerprogram which, when running on an electronic device, causes the methoddescribed in any one of the foregoing Embodiments 1 to 10 to beimplemented.

The technical solutions of the present disclosure have been described indetail with reference to the accompanying drawings. Through thetechnical solutions of the present disclosure, a transition type withhigh fitness to a transition position and enabling the best transitioneffect can be automatically selected for the transition position, whichnot only reduces the difficulty in implementing video transition, butalso enables high-quality video transition effects, improving the userexperience.

It should be appreciated that the term “and/or” used herein is intendedto only describe an association relationship between associated objects,indicating that there may be three relationships. For example, A and/orB may indicate three cases: A exists alone, A and B exist at the sametime, and B exists alone. In addition, the character “/” hereingenerally indicates that the associated objects are in an “or”relationship.

Depending on the context, the word “if” used herein may be interpretedas “when . . . ”, or “in a case where . . . ”, or “in response todetermining”, or “in response to detecting”. Similarly, depending on thecontext, the phrase “if it is determined” or “if it is detected (thestated condition or event)” may be interpreted as “when it isdetermined” or “in response to determining” or “when it is detected (thestated condition or event), or “in response to detecting (the statedcondition or event)”.

In the several embodiments provided in this disclosure, it should beappreciated that the disclosed system, apparatus and methods may beimplemented in other ways. For example, the apparatus embodimentsdescribed above are only illustrative. For example, the division of theunits is only a logical function division. In actual implementation,there may be other division methods. For example, multiple units orcomponents may be combined, or may be integrated into another system;or, some features may be omitted, or not implemented. In addition, theshown or discussed mutual coupling or direct coupling or communicationconnection may be implemented through some interfaces, and the indirectcoupling or communication connection of devices or units may beelectrical, mechanical or in other forms.

In addition, the individual functional units in the various embodimentsof the present disclosure may be integrated into one processing unit, oreach unit may exist physically alone, or two or more units may beintegrated into one unit. The above-mentioned integrated unit may beimplemented in the form of hardware, or in the form of hardware plussoftware functional units.

The above-mentioned integrated unit implemented in the form of softwarefunctional units may be stored in a computer-readable storage medium.The above-mentioned software functional units are stored in a storagemedium, and include several instructions to cause a computer device(which may be a personal computer, a server, or a network device, etc.)or a processor to execute some steps of the methods described in thevarious embodiments of the present disclosure. The aforementionedstorage medium includes: U disk, mobile hard disk, read-only memory(ROM), random access memory (RAM), magnetic disk or optical disk orother media that can store program codes.

The foregoing are only preferred embodiments of the present disclosure,and are not intended to limit the present disclosure. Any modifications,equivalent replacements, improvements, etc. made within the spirit andprinciples of the present disclosure shall fall within the scope ofprotection of the present disclosure.

What is claimed is:
 1. A transition type determination method,comprising: acquiring a picture matching degree of a candidatetransition type with a transition position between two adjacent videoclips, and acquiring a music matching degree of the candidate transitiontype; wherein the picture matching degree is determined according to thetwo adjacent video clips and the candidate transition type, and themusic matching degree is determined according to the candidatetransition type and background music of a video to which the twoadjacent video clips belong; determining, based on the acquired picturematching degree and the acquired music matching degree, a matchingdegree of the candidate transition type at the transition position; anddetermining, according to the matching degree, whether to determine thecandidate transition type as a target transition type for the transitionposition, wherein the target transition type is used for a transitioneffect between the two adjacent video clips.
 2. The transition typedetermination method according to claim 1, wherein the determining,based on the acquired picture matching degree and the acquired musicmatching degree, a matching degree of the candidate transition type atthe transition position comprises: performing weighting processing onthe acquired picture matching degree and the acquired music matchingdegree, to obtain the matching degree of the candidate transition typeat the transition position.
 3. The transition type determination methodaccording to claim 1, further comprising: acquiring a predeterminedtransition type selection strategy, wherein the predetermined transitiontype selection strategy defines that, if the transition position is adesignated transition position in the video, the target transition typeat the transition position is selected from at least one designatedtransition type corresponding to the designated transition position; andwherein the determining, according to the matching degree, whether todetermine the candidate transition type as a target transition type forthe transition position comprises: adding a first adjustment coefficientto the matching degree of the candidate transition type, when thetransition position is the designated transition position in the videoand if the candidate transition type is another transition type otherthan the at least one designated transition type, wherein the firstadjustment coefficient is used to make the candidate transition typeexcluded for the target transition type.
 4. The transition typedetermination method according to claim 3, wherein the predeterminedtransition type selection strategy further defines that, if the targettransition type occurs at the transition position, the number ofoccurrences of the target transition type is less than a first specifiednumber of times; and wherein the determining, according to the matchingdegree, whether to determine the candidate transition type as a targettransition type for the transition position further comprises: adding asecond adjustment coefficient to the matching degree of the candidatetransition type, when the candidate transition type occurs at thetransition position and if the number of occurrences of the candidatetransition type is greater than or equal to the first specified numberof times, wherein the second adjustment coefficient is used to make thecandidate transition type excluded for the target transition type. 5.The transition type determination method according to claim 3, whereinthe predetermined transition type selection strategy further definesthat, when the target transition type occurs at the transition position,the number of consecutive occurrences of the target transition type isless than a second specified number of times; and wherein thedetermining, according to the matching degree, whether to determine thecandidate transition type as a target transition type for the transitionposition further comprises: adding a second adjustment coefficient tothe matching degree of the candidate transition type, when the candidatetransition type occurs at the transition position and if the number ofconsecutive occurrences of the candidate transition type is greater thanor equal to the second specified number of times, wherein the secondadjustment coefficient is used to make the candidate transition typeexcluded for the target transition type.
 6. The transition typedetermination method according to claim 3, wherein the predeterminedtransition type selection strategy further defines that, when the targettransition type occurs at the transition position, the number ofoccurrences of the target transition type is less than a first specifiednumber of times, and the number of consecutive occurrences of thecandidate transition type is less than a second specified number oftimes; and wherein the determining, according to the matching degree,whether to determine the candidate transition type as a targettransition type for the transition position further comprises: adding asecond adjustment coefficient to the matching degree of the candidatetransition type, when the candidate transition type occurs at thetransition position and if the number of occurrences of the candidatetransition type is greater than or equal to the first specified numberof times and the number of consecutive occurrences of the candidatetransition type is greater than or equal to the second specified numberof times, wherein the second adjustment coefficient is used to make thecandidate transition type excluded for the target transition type. 7.The transition type determination method according to claim 4, whereinthere are a plurality of transition positions in the video, and thedetermining, according to the matching degree, whether to determine thecandidate transition type as a target transition type for the transitionposition, further comprises: when the transition position is a firsttransition position of the video, determining the matching degree of thecandidate transition type at the first transition position, as a largestmatching degree of the candidate transition type at the transitionposition; when the transition position is a non-first transitionposition of the video, based on the matching degree of the candidatetransition type at this transition position, and on respective largestmatching degrees of the candidate transition type and other candidatetransition types at a previous transition position preceding thistransition position in the video, determining a largest matching degreeof the candidate transition type at this transition position, anddetermining a candidate transition type that should be selected for theprevious transition position when this transition position has thelargest matching degree; and selecting a corresponding target transitiontype for each transition position of the video, based on respectivelargest matching degrees of the candidate transition type and the othercandidate transition types at each of non-first transition positions,and on a candidate transition type that should be selected for aprevious transition position preceding each of the non-first transitionpositions when the non-first transition position obtains its largestmatching degree.
 8. The transition type determination method accordingto claim 5, wherein there are a plurality of transition positions in thevideo, and the determining, according to the matching degree, whether todetermine the candidate transition type as a target transition type forthe transition position, further comprises: when the transition positionis a first transition position of the video, determining the matchingdegree of the candidate transition type at the first transitionposition, as a largest matching degree of the candidate transition typeat the transition position; when the transition position is a non-firsttransition position of the video, based on the matching degree of thecandidate transition type at this transition position, and on respectivelargest matching degrees of the candidate transition type and othercandidate transition types at a previous transition position precedingthis transition position in the video, determining a largest matchingdegree of the candidate transition type at this transition position, anddetermining a candidate transition type that should be selected for theprevious transition position when this transition position has thelargest matching degree; and selecting a corresponding target transitiontype for each transition position of the video, based on respectivelargest matching degrees of the candidate transition type and the othercandidate transition types at each of non-first transition positions,and on a candidate transition type that should be selected for aprevious transition position preceding each of the non-first transitionpositions when the non-first transition position obtains its largestmatching degree.
 9. The transition type determination method accordingto claim 6, wherein there are a plurality of transition positions in thevideo, and the determining, according to the matching degree, whether todetermine the candidate transition type as a target transition type forthe transition position, further comprises: when the transition positionis a first transition position of the video, determining the matchingdegree of the candidate transition type at the first transitionposition, as a largest matching degree of the candidate transition typeat the transition position; when the transition position is a non-firsttransition position of the video, based on the matching degree of thecandidate transition type at this transition position, and on respectivelargest matching degrees of the candidate transition type and othercandidate transition types at a previous transition position precedingthis transition position in the video, determining a largest matchingdegree of the candidate transition type at this transition position, anddetermining a candidate transition type that should be selected for theprevious transition position when this transition position has thelargest matching degree; and selecting a corresponding target transitiontype for each transition position of the video, based on respectivelargest matching degrees of the candidate transition type and the othercandidate transition types at each of non-first transition positions,and on a candidate transition type that should be selected for aprevious transition position preceding each of the non-first transitionpositions when the non-first transition position obtains its largestmatching degree.
 10. The transition type determination method accordingto claim 1, wherein there are a plurality of candidate transition types,and the determining, according to the matching degree, whether todetermine the candidate transition type as a target transition type forthe transition position, further comprises: selecting, from theplurality of candidate transition types, a candidate transition typewith the largest matching degree at the transition position, as thetarget transition type for the transition position.
 11. An electronicdevice, comprising: at least one processor, and a memory communicativelyconnected with the at least one processor, wherein the memory storesinstructions executable by the at least one processor, and theinstructions are configured to cause the at least one processor to:acquire a picture matching degree of each of a plurality of candidatetransition types with each of transition positions of a video, andacquire music matching degrees of the plurality of candidate transitiontypes, wherein each transition position is between two adjacent videoclips of the video, the picture matching degree of each candidatetransition type at each transition position is determined according tothe two adjacent video clips corresponding to the transition positionand the candidate transition type, and the music matching degree of eachcandidate transition type is determined according to the candidatetransition type and background music of the video; determine, based onthe acquired picture matching degrees and the acquired music matchingdegrees, matching degrees of the plurality of candidate transition typesat each transition position; and determine, according to the matchingdegrees, a target transition type for each transition position, whereinthe target transition type for each transition position is used for atransition effect between the two adjacent video clips corresponding tothe transition position.
 12. The electronic device according to claim11, wherein the instructions are further configured to cause the atleast one processor to: for each of the plurality of candidatetransition types at each transition position, perform weightingprocessing on the acquired picture matching degree and the acquiredmusic matching degree of the candidate transition type at the transitionposition, to obtain the matching degree of the candidate transition typeat the transition position.
 13. The electronic device according to claim12, wherein the instructions are further configured to cause the atleast one processor to: acquire a predetermined transition typeselection strategy, wherein the predetermined transition type selectionstrategy defines that, for each transition position, if the transitionposition is a designated transition position in the video, the targettransition type at the transition position is selected from at least onedesignated transition type corresponding to the designated transitionposition.
 14. The electronic device according to claim 13, wherein theinstructions are further configured to cause the at least one processorto: for each of the plurality of candidate transition types at eachtransition position, add a first adjustment coefficient to the matchingdegree of the candidate transition type at the transition position, whenthe transition position is the designated transition position in thevideo and if the candidate transition type is another transition typeother than the at least one designated transition type, wherein thefirst adjustment coefficient is used to make the candidate transitiontype excluded for the target transition type.
 15. The electronic deviceaccording to claim 14, wherein the predetermined transition typeselection strategy further defines that, for each transition position,if the target transition type occurs at the transition position, thenumber of occurrences of the target transition type is less than a firstspecified number of times; and the instructions are further configuredto cause the at least one processor to: for each of the plurality ofcandidate transition types at each transition position, add a secondadjustment coefficient to the matching degree of the candidatetransition type at the transition position, when the candidatetransition type occurs at the transition position and if the number ofoccurrences of the candidate transition type is greater than or equal tothe first specified number of times, wherein the second adjustmentcoefficient is used to make the candidate transition type excluded forthe target transition type.
 16. The electronic device according to claim14, wherein the predetermined transition type selection strategy furtherdefines that, for each transition position, when the target transitiontype occurs at the transition position, the number of consecutiveoccurrences of the target transition type is less than a secondspecified number of times; and the instructions are further configuredto cause the at least one processor to: for each of the plurality ofcandidate transition types at each transition position, add a secondadjustment coefficient to the matching degree of the candidatetransition type at the transition position, when the candidatetransition type occurs at the transition position and if the number ofconsecutive occurrences of the candidate transition type is greater thanor equal to the second specified number of times, wherein the secondadjustment coefficient is used to make the candidate transition typeexcluded for the target transition type.
 17. The electronic deviceaccording to claim 14, wherein the predetermined transition typeselection strategy further defines that, for each transition position,when the target transition type occurs at the transition position, thenumber of occurrences of the target transition type is less than a firstspecified number of times, and the number of consecutive occurrences ofthe candidate transition type is less than a second specified number oftimes; and the instructions are further configured to cause the at leastone processor to: for each of the plurality of candidate transitiontypes at each transition position, add a second adjustment coefficientto the matching degree of the candidate transition type at thetransition position, when the candidate transition type occurs at thetransition position and if the number of occurrences of the candidatetransition type is greater than or equal to the first specified numberof times and if the number of consecutive occurrences of the candidatetransition type is greater than or equal to the second specified numberof times, wherein the second adjustment coefficient is used to make thecandidate transition type excluded for the target transition type. 18.The electronic device according to claim 11, wherein the instructionsare further configured to cause the at least one processor to: for eachtransition position, selecting, from the plurality of candidatetransition types, a candidate transition type with the largest matchingdegree at the transition position, as the target transition type for thetransition position.
 19. The electronic device according to claim 11,wherein the instructions are further configured to cause the at leastone processor to: when the transition position is a first transitionposition of the video, determine the matching degree of the candidatetransition type at the first transition position, as a largest matchingdegree of the candidate transition type at the transition position; whenthe transition position is a non-first transition position of the video,based on the matching degree of the candidate transition type at thistransition position, and on respective largest matching degrees of thecandidate transition type and other candidate transition types at aprevious transition position preceding this transition position in thevideo, determine a largest matching degree of the candidate transitiontype at this transition position, and determine a candidate transitiontype that should be selected for the previous transition position whenthis transition position has the largest matching degree; and select acorresponding target transition type for each transition position of thevideo, based on respective largest matching degrees of the candidatetransition type and the other candidate transition types at each ofnon-first transition positions, and on a candidate transition type thatshould be selected for a previous transition position preceding each ofthe non-first transition positions when the non-first transitionposition obtains its largest matching degree.
 20. A non-transitorystorage medium storing computer-executable instructions thereon, whereinthe computer-executable instructions are configured to implement atransition type determination method comprising: acquiring a picturematching degree of a candidate transition type with a transitionposition between two adjacent video clips, and acquiring a musicmatching degree of the candidate transition type, wherein the picturematching degree is determined according to the two adjacent video clipsand the candidate transition type, and the music matching degree isdetermined according to the candidate transition type and backgroundmusic of a video to which the two adjacent video clips belong;determining, based on the acquired picture matching degree and theacquired music matching degree, a matching degree of the candidatetransition type at the transition position; and determining, based onthe matching degree of the candidate transition type, a targettransition type for the transition position, wherein the targettransition type is used for a transition effect between the two adjacentvideo clips.